<?php

class Country {
    function getCoutryList($fields='*',$where=''){
        $db_obj = new DB();
        if(!empty($where)){
            $where=" where ".$where;
        }
        $sql="select {$fields} from country ".$where;
        $db_obj->query($sql);
        if($db_obj->rowCount() > 0) {
            $country_details = $db_obj->getResults($sql);
            $extra_obj = new Extra();
            return $extra_obj->objectToArray($country_details);
        } else {
            return false;
        }
    }
    
    function getCityList($fields='*',$where=''){
        $db_obj = new DB();
        if(!empty($where)){
            $where=" where ".$where;
        }
        $sql="select {$fields} from city ".$where;
        
        $db_obj->query($sql);
        if($db_obj->rowCount() > 0) {
            $country_details = $db_obj->getResults($sql);
            $extra_obj = new Extra();
            return $extra_obj->objectToArray($country_details);
        } else {
            return false;
        }
    }
}
?>
